<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .test1{
            font-size: 20px;
            line-height: 0;
            border:1px solid #cccccc;
            background: #eeeeee;
        }
        .test2{
            font-size: 0;
            line-height: 20px;
            border: 1px solid #cccccc;
            background: #eeeeee;
        }
    </style>
</head>
<body>
    <div class="test1">
        测试
    </div>
    <div class="test2">
        测试
    </div>
</body>
</html>